import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter);

import Index from '@/page/Index.vue';
import Home from '@/page/Home.vue';
import Test from '@/page/Test.vue';
import Login from '@/page/Login.vue';
import Register from '@/page/Register.vue';
// import Api from '../pages/Api.vue';
const router = new VueRouter({
    // mode: 'history',
    /*scrollBehavior,*/
    routes: [
        // { path: '/', redirect: '/Register' },
        {
            path: '/',
            component: Index,
            children: [{
                path: '',
                component: Home
            },{
                path: 'test',
                component: Test
            }]
        },
        { name:'login', path: '/login/:backUrl?', component: Login },
        { path: '/register', component: Register },
        // { path: '/api', component: Api},
    ]
}) 
export default router;